package com.maiji.cloud.entities.login;

import java.util.Date;
import java.util.Objects;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.gitee.sunchenbin.mybatis.actable.annotation.Column;
import com.gitee.sunchenbin.mybatis.actable.annotation.Table;
import com.gitee.sunchenbin.mybatis.actable.constants.MySqlTypeConstant;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

/**
 * 当日记录体重获得减肥基金的记录表 Description:
 * @author zhanglr
 * @date 2019年9月6日
 */
@NoArgsConstructor
@Data
@Accessors(chain = true)
@Table(name = "reduce_weight_fund_log")
@TableName("reduce_weight_fund_log")
public class ReduceWeightFundLogEntity {

	@TableId
	@Column(name = "uu_id", type = MySqlTypeConstant.VARCHAR, length = 50, isKey = true)
	private String uuId; // 主键

	@Column(name = "weight_change_log_id", type = MySqlTypeConstant.VARCHAR, length = 50)
	private String weightChangeLogId; // 体重记录id

	@Column(name = "user_id", type = MySqlTypeConstant.VARCHAR, length = 50)
	private String userId; // 用户id

	@Column(name = "lose_weight", type = MySqlTypeConstant.DOUBLE, length = 8, decimalLength = 2)
	private Double loseWeight; // 减重数量kg

	@Column(name = "money", type = MySqlTypeConstant.DOUBLE, length = 8, decimalLength = 2)
	private Double money; // 获取基础减肥基金金额

	@Column(name = "in_time", type = MySqlTypeConstant.DATETIME)
	private Date inTime; // 记录时间

	@Column(name = "is_base_fund", type = MySqlTypeConstant.INT, defaultValue = "0")
	private Integer isBaseFund; // 是否已经领取减肥基金
	
	@Column(name = "end_time", type = MySqlTypeConstant.DATETIME)
	private Date endTime; // 助力结束时间

	@Column(name = "settlement", type = MySqlTypeConstant.INT, defaultValue = "0")
	private Integer settlement; // 是否结算0未结算 1已结算

	@Override
	public boolean equals(Object o) {
		if (this == o)
			return true;
		if (o == null || getClass() != o.getClass())
			return false;
		ReduceWeightFundLogEntity that = (ReduceWeightFundLogEntity) o;
		return uuId.equals(that.uuId);
	}

	@Override
	public int hashCode() {
		return Objects.hash(uuId);
	}

}
